<?php
namespace Home\Controller;

use Think\Controller;

class IndexController extends Controller {
    public function index() {
        $article_model = M('Article');
        //获取轮播图
        $conditionCategory['category_id'] = 18;
        $conditionCategory['status'] = 1;
        $ret_lunbo                        = $article_model->where($conditionCategory)->select();

        $this->assign('lunbo', $ret_lunbo);

        //获取文章
        $conditionArticle['category_id'] = 12;
        $conditionArticle['status'] = 1;
        $ret_article                     = $article_model->where($conditionArticle)->select();
        $this->assign('article', $ret_article);

        $this->display();
    }
}